package com.ds.dalgen.loader;

import com.ds.dalgen.context.Context;

public abstract class Loader {

	public void loadContext(Context context) {

		try {
			// load all config
			loadConfiguration(context);
			loadTableInfos(context);
			loadGeneratorInfos(context);

			// convert the DB_TYPE to Java_TYPE
			convertTypes(context);

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	protected abstract void loadConfiguration(Context context);

	protected abstract void loadTableInfos(Context context);

	protected abstract void loadGeneratorInfos(Context context);

	protected abstract void convertTypes(Context context);
}
